﻿using Architecture.Repository.Interface.Traceability;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Traceability.Domain.BreedDomain;

namespace Architecture.Repository.Impl.Traceability
{
    public class TraceabilitiesRepository : BaseRepository<Traceabilities>, ITraceabilitiesRepoisotry
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context"></param>
        public TraceabilitiesRepository(EFCoreContext context) : base(context)
        {

        }

        public async Task<int> AddTraceabilities(Traceabilities traceabilities)
        {
            return await base.AddAsync(traceabilities);
        }

        public async Task<List<Traceabilities>> GetTraceabilitiesList()
        {
            return await base.GetAllAsync();    
        }

        public async Task<int> UpdateTraceabilities(Traceabilities traceabilities)
        {
            return await base.UpdateAsync(traceabilities);
        }

        public async Task<Traceabilities> BackInfoTraceabilities(int traceabilityId)
        {
            return await base.GetModelAsync(traceabilityId);
        }

    }
}
